<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateSuperviseSheetAssignTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('supervise_sheet_assign', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('supervise_id',false)->default(0)->comment('监督问卷id');
            $table->unsignedBigInteger('sheet_id',false)->default(0)->comment('监督项id');
            $table->unsignedBigInteger('unit_id',false)->default(0)->comment('单位id');
            $table->unsignedBigInteger('admin_id',false)->default(0)->comment('管理员id');
            $table->tinyInteger('feed_status',false)->default(0)->comment('分配回馈状态');
            $table->string('assign_txt')->nullable()->comment('分配备注');
            $table->string('feed_txt')->nullable()->comment('回馈备注');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('supervise_sheet_assign');
    }
}
